Victor Toso [Mon, 17 Oct 2016 16:21:06 +0000 (18:21 +0200)]
tests: fix clipboard test by loading correct icon
The icon name changed from "terminal" to "utilities-terminal" in
Adwaita-icon-theme.
Signed-off-by: Victor Toso <victortoso@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=773113
Matthias Clasen [Fri, 21 Oct 2016 15:08:07 +0000 (11:08 -0400)]
docs: Expand icon-palette example
Add a warning color, and show that hex colors work here.
Matthias Clasen [Fri, 21 Oct 2016 13:58:36 +0000 (09:58 -0400)]
Add border-width to the migration guide
No good answers here yet.
Timm Bäder [Fri, 21 Oct 2016 08:12:40 +0000 (10:12 +0200)]
window: Don't leak the GskRenderer
Lapo Calamandrei [Fri, 21 Oct 2016 11:53:02 +0000 (13:53 +0200)]
Fix a typo in the css docs
Chun-wei Fan [Fri, 21 Oct 2016 05:40:49 +0000 (13:40 +0800)]
gdkwindow-win32.c: Make code compatible with GDK 4.0 APIs
Port the code here so that things will continue to build and work on 4.x.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
Timm Bäder [Thu, 20 Oct 2016 19:12:36 +0000 (21:12 +0200)]
Fix a few memory leaks
Matthias Clasen [Thu, 20 Oct 2016 20:09:45 +0000 (16:09 -0400)]
Beef up the migration guide
Matthias Clasen [Thu, 20 Oct 2016 18:05:34 +0000 (14:05 -0400)]
Add a bit more to the migration guide
Timm Bäder [Thu, 20 Oct 2016 17:51:43 +0000 (19:51 +0200)]
Remove some more GdkColor properties
Timm Bäder [Thu, 20 Oct 2016 15:58:03 +0000 (17:58 +0200)]
button: Fix icon-name implementation
Timm Bäder [Thu, 20 Oct 2016 15:57:53 +0000 (17:57 +0200)]
button: Remove grab_time
Unused.
Timm Bäder [Thu, 20 Oct 2016 11:58:36 +0000 (13:58 +0200)]
container: Remove composite_name
Timm Bäder [Thu, 20 Oct 2016 11:43:10 +0000 (13:43 +0200)]
frame: Remove unused constants
Timm Bäder [Wed, 19 Oct 2016 19:02:09 +0000 (21:02 +0200)]
container: Remove reallocate_redraws
Timm Bäder [Wed, 19 Oct 2016 18:48:11 +0000 (20:48 +0200)]
gtk4-demo: Fix builder demo
Timm Bäder [Wed, 19 Oct 2016 18:17:45 +0000 (20:17 +0200)]
widget: Remove in_reparent flag
gtk_widget_reparent is gone so we don't need this anymore.
Timm Bäder [Tue, 18 Oct 2016 18:13:31 +0000 (20:13 +0200)]
menuitem: Stop looking at nonexistant child properties
Timm Bäder [Tue, 18 Oct 2016 17:50:32 +0000 (19:50 +0200)]
checkbutton: Remove unused constants
Timm Bäder [Mon, 17 Oct 2016 16:44:46 +0000 (18:44 +0200)]
builder: Stop parsing GdkColor values
Timm Bäder [Mon, 17 Oct 2016 16:06:35 +0000 (18:06 +0200)]
shortcutswindow: Remove unneeded deprecation guards
Leftovers from when it was still using a GtkArrow
Timm Bäder [Mon, 17 Oct 2016 15:21:09 +0000 (17:21 +0200)]
testsuite: Update buttons.nodes
We don't create a box anymore here.
Timm Bäder [Thu, 20 Oct 2016 11:35:45 +0000 (13:35 +0200)]
container: Don't queue resize on non-toplevel widgets
Carlos Garnacho [Tue, 18 Oct 2016 17:18:14 +0000 (19:18 +0200)]
wayland: Allow grabless xdg_popups
xdg_shell v6 allows grabless popups, whose behavior is not that
different from override redirect windows with no grab to take
keyboard input (and pointer events outside).
This means we can relax the requirement to have a grab before
creating an xdg_popup. The warning is still useful to have so
people stop relying on gdk_window_show();gdk_device_grab() being
an ok pattern to popup a window, it's been moved to wayland
implementation of gdk_device_grab() instead, so we warn if trying
to grab a GDK_WINDOW_TEMP window that's already visible.
https://bugzilla.gnome.org/show_bug.cgi?id=771694
Emmanuele Bassi [Wed, 19 Oct 2016 14:21:03 +0000 (15:21 +0100)]
build: Enable subdir-objects
Newer versions of Automake warn about forward compatibility when the
build uses sources in sub-directories without the subdir-objects option.
Both GTK+ and GDK have an almost-but-not-quite non-recursive Automake
layout, with sources in sub-directories contributing to the build of a
top-level object.
In theory, just adding subdir-objects to AM_INIT_AUTOMAKE would be
enough, but the test suite references sources in a different top-level
in order to build tests that verify the implementation of private data
structures. This is not really allowed when using subdir-objects and out
of srcdir builds. In order to fix this case, we require some ad hoc
rules to create symbolic links in the appropriate build directory.
Lapo Calamandrei [Wed, 19 Oct 2016 13:56:41 +0000 (15:56 +0200)]
Adwaita: make circular button border looking nice
the darker bottom border used on buttons looks bad on circular ones
so now a gradient clipped on the border-box and a transparent
border is used in that partcular case.
See https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details.
Lapo Calamandrei [Tue, 18 Oct 2016 11:55:37 +0000 (13:55 +0200)]
Adwaita: sass, make button mixin export a global $button_fill var
$button_fill contains the background-image property value of
buttons, having it readable outside the drawing mixin allows, for
example, stacking background images in an easier way.
Lapo Calamandrei [Tue, 18 Oct 2016 11:16:07 +0000 (13:16 +0200)]
Adwaita: sass cleanup
aggregate circular button style to the main button structure.
Lapo Calamandrei [Tue, 18 Oct 2016 11:08:02 +0000 (13:08 +0200)]
widget-factory: use circular style class on the circular button...
...in place of the circular-button one, killing the custom style
shipped, realying on the theme style.
Emmanuele Bassi [Wed, 19 Oct 2016 13:34:05 +0000 (14:34 +0100)]
build: Remove unused target variables
The foreigndrawing test has been removed.
Emmanuele Bassi [Wed, 19 Oct 2016 13:04:00 +0000 (14:04 +0100)]
icontheme: Simplify lookup_size()
No need to use an internal function, and no need to store the icon size
id, since we're using the id as the offset.
Chun-wei Fan [Wed, 19 Oct 2016 10:39:36 +0000 (18:39 +0800)]
Visual Studio builds: Update from [gdk|gtk]-3 to [gdk|gtk]-4
This updates all the projects files to be be named appropriately as we move from GTK-3.x to 4.x,
and updates the autotools files so that things are distributed and generated properly.
Also remove deprecated/gtkstatusicon-quartz.c from gtk/Makefile.am, as that was causing 'make dist'
to fail as that file has been removed.
This fixes 'make dist' with the updated existing project files in proper order.
Note that this does not include the new GSK, which will be added later, so the project files do
not yet build the whole stack on Visual Studio at this point.
Chun-wei Fan [Wed, 19 Oct 2016 08:13:54 +0000 (16:13 +0800)]
Visual Studio Solutions: Drop references to libgail-util
We dropped it...
Chun-wei Fan [Wed, 19 Oct 2016 06:48:08 +0000 (14:48 +0800)]
build/: Force MSVC project file generation on Makefile.am changes
Make the Makefile.am targets for generating the Visual Studio projects re-generate the
project files and the header listings whenever the Makefile.am's that include
build/Makefile.msvcproj changes, so that whenever a source/header is added, they will
be reflected in the projects and in the property sheets that are used to copy the
headers.
Also ensure that these are applied to the vs11, vs12 and vs14 projects when this
happens, as they are copied and processed from the Visual Studio 2010 projects.
Matthias Clasen [Tue, 18 Oct 2016 20:20:44 +0000 (16:20 -0400)]
Add some content to the migration guide
Matthias Clasen [Tue, 18 Oct 2016 19:21:12 +0000 (15:21 -0400)]
Start a new migration guide
Remove information that is only relevant for porting to GTK+ 3,
and put scaffolding in place for information relevant to GTK+ 4.
Emmanuele Bassi [Tue, 18 Oct 2016 15:49:21 +0000 (16:49 +0100)]
gsk: Clear the profiler instance
When disposing the GskRenderer.
Emmanuele Bassi [Tue, 18 Oct 2016 15:34:03 +0000 (16:34 +0100)]
gsk: Plug leak in GskRenderNode
We need to destroy the node's surface when finalizing it.
Emmanuele Bassi [Tue, 18 Oct 2016 14:51:05 +0000 (15:51 +0100)]
build: Fix variable name for gtk4-update-icon-cache target
Emmanuele Bassi [Tue, 18 Oct 2016 14:47:00 +0000 (15:47 +0100)]
build: Rework the GSK source lising
We need to only parse the public sources during the introspection step,
otherwise the introspection scanner will try to access private data
types.
Emmanuele Bassi [Tue, 18 Oct 2016 14:29:29 +0000 (15:29 +0100)]
build: Drop LDADD from GSK's Makefile
We can use the LDFLAGS target build.
Matthias Clasen [Tue, 18 Oct 2016 14:27:45 +0000 (10:27 -0400)]
Rename all binaries to be versioned
This is just easier to avoid parallel installation problems.
Matthias Clasen [Tue, 18 Oct 2016 13:59:42 +0000 (09:59 -0400)]
Rename gtk-query-immodules to follow our binary naming scheme
Instead of gtk-query-immodules-4.0, lets call it gtk4-query-immodules,
to use the same prefix as all the other versioned binaries.
Matthias Clasen [Tue, 18 Oct 2016 12:56:14 +0000 (08:56 -0400)]
Fix the docs build more
This makes gtk-doc produce output again.
Rico Tzschichholz [Tue, 18 Oct 2016 11:38:08 +0000 (13:38 +0200)]
gdk: Fix Since tag of gdk_cairo_surface_upload_to_gl
Rico Tzschichholz [Tue, 18 Oct 2016 11:27:19 +0000 (13:27 +0200)]
gdk: Add missing Since tags for gdk_window_new_child/input
In addition to
d22e5e69d93401f8f0a040767fbf69ac5643a19d
Emmanuele Bassi [Tue, 18 Oct 2016 10:37:10 +0000 (11:37 +0100)]
gsk: Bump up all version annotations
GSK is part of the 4.0 development cycle.
Emmanuele Bassi [Tue, 18 Oct 2016 10:35:32 +0000 (11:35 +0100)]
docs: Bump up major version for GSK's API reference
Emmanuele Bassi [Thu, 25 Aug 2016 10:31:56 +0000 (11:31 +0100)]
gsk: Add the ability to create fallback renderers
While porting GTK to GskRenderer we noticed that the current fallback
code for widgets using Cairo to draw is not enough to cover all the
possible cases.
For instance, if a container widget still uses GtkWidget::draw to render
its children, and at least one of them has been ported to using render
nodes instead, the container won't know how to draw it.
For this reason we want to provide to layers above GSK the ability to
create a "fallback" renderer instance, created using a "parent"
GskRenderer instance, but using a Cairo context as the rendering target
instead of a GdkDrawingContext.
GTK will use this inside the gtk_widget_draw() implementation, if a
widget implements GtkWidgetClass.get_render_node().
Emmanuele Bassi [Thu, 25 Aug 2016 10:29:00 +0000 (11:29 +0100)]
gsk: Update Cairo renderer
The Cairo renderer has been lagging behind a series of changes inside
GskRenderer, like surface-less nodes, so it needs to be updated.
Emmanuele Bassi [Wed, 24 Aug 2016 15:21:50 +0000 (16:21 +0100)]
gsk: Make GskRenderer.render() drawing context-agnostic
We're going to need to allow rendering on a specific cairo_t in order to
implement fallback code paths inside GTK; this means that there will be
times when we have a transient GskRenderer instance that does not have a
GdkDrawingContext to draw on.
Instead of adding a new render() implementation for those cases and then
decide which one to use, we can remove the drawing context argument from
the virtual function itself, and allow using a NULL GdkDrawingContext
when calling gsk_renderer_render(). A later commit will add a generic
function to create a transient GskRenderer with a cairo_t attached to
it.
Renderers inside GSK will have to check whether we have access to a
GdkDrawingContext, in which case we're going to use it; or if we have
access to a cairo_t and a window.
Emmanuele Bassi [Wed, 24 Aug 2016 13:12:58 +0000 (14:12 +0100)]
docs: Update the GSK API reference section
Emmanuele Bassi [Wed, 24 Aug 2016 13:07:26 +0000 (14:07 +0100)]
gsk: Move GskRenderNode getters to internal API
GskRenderNode is, at its core, a write-only API; you're supposed to set
up the render nodes instead of querying them for state.
Querying render nodes is left to the GskRenderer implementation.
Emmanuele Bassi [Wed, 24 Aug 2016 12:47:23 +0000 (13:47 +0100)]
gsk: Remove GskRenderer:auto-clear
We control the clearing inside each GskRenderer implementation, and we
don't allow providing a target surface any more.
Matthias Clasen [Thu, 18 Aug 2016 21:25:41 +0000 (17:25 -0400)]
Convert GtkSpinner to indirect rendering
Matthias Clasen [Thu, 18 Aug 2016 20:06:31 +0000 (16:06 -0400)]
Convert GtkImage to indirect rendering
Matthias Clasen [Thu, 18 Aug 2016 14:01:15 +0000 (10:01 -0400)]
Convert GtkAccelLabel to indirect rendering
Matthias Clasen [Thu, 18 Aug 2016 13:59:35 +0000 (09:59 -0400)]
Convert GtkLabel to indirect rendering
Warning! This breaks GtkAccelLabel. It will be fixed in the next
commit.
Matthias Clasen [Thu, 18 Aug 2016 06:39:08 +0000 (02:39 -0400)]
Convert GtkFlowBox to indirect rendering
Matthias Clasen [Tue, 16 Aug 2016 16:19:48 +0000 (12:19 -0400)]
container: Prepare to prune render nodes
Add a should_propagate function for render nodes. Eventually,
this is meant to avoid creating render nodes for child widgets
that are outside the parents clip area. Since we don't have
that information available right now, just filter out nondrawable
children for now.
Matthias Clasen [Sat, 13 Aug 2016 08:17:35 +0000 (04:17 -0400)]
Split css background into individual render nodes
Use separate render nodes for each layer in a multi-image
background. WARNING: blend modes don't work right yet.
Matthias Clasen [Sat, 13 Aug 2016 08:07:38 +0000 (04:07 -0400)]
Add blend mode to debug spew
Matthias Clasen [Fri, 12 Aug 2016 22:23:25 +0000 (18:23 -0400)]
Don't create render nodes for empty backgrounds
Matthias Clasen [Fri, 12 Aug 2016 22:13:17 +0000 (18:13 -0400)]
Break out the css background render node in a function
This is in preparation for creating separate render nodes
for individual backgrounds.
Matthias Clasen [Fri, 12 Aug 2016 21:13:52 +0000 (17:13 -0400)]
Make outer shadows work again
Change get_render_node to return nodes that are sized to the clip
area and expect to be placed at the clip position; change
gtk_container_propagate_render_node to place child render nodes
accordingly, and change gtk_css_gadget_get_render_node to return
nodes that are sized accordingly as well.
Alexander Larsson [Tue, 16 Aug 2016 10:44:39 +0000 (12:44 +0200)]
gsk: Fix hidpi scaling
We store the vertices in (unscaled) window coords (but the item size
is still scaled to match the texture size). Also, the
projection/model-view multiplication order is switched so that the scale
is applied at the right place.
Alexander Larsson [Tue, 16 Aug 2016 09:53:49 +0000 (11:53 +0200)]
gdk_cairo_surface_upload_to_gl: Don't apply device scale
The arguments to this function is the texture width/height, and these
are already scaled.
Emmanuele Bassi [Sat, 13 Aug 2016 07:36:59 +0000 (08:36 +0100)]
gsk: Remove :use-alpha from GskRenderer
It's unused, and we always assume we render with an alpha channel
enabled because it's 2016.
Emmanuele Bassi [Sat, 13 Aug 2016 07:34:22 +0000 (08:34 +0100)]
gsk: Move scaling filters to GskRenderNode
The renderer will always use nearest-neighbor filters because it renders
at 1:1 pixel to texel ratio.
On the other hand, render nodes may be scaled, so we need to offer a way
to control the minification and magnification filters.
Emmanuele Bassi [Fri, 12 Aug 2016 15:44:29 +0000 (16:44 +0100)]
gsk: Allow adding a GL texture as a node content
If we already have a GL texture we definitely don't want to use
gdk_cairo_draw_from_gl() to draw on a Cairo context if we're going
to take the Cairo surface to which we draw and put it into an OpenGL
texture.
Emmanuele Bassi [Wed, 10 Aug 2016 16:50:03 +0000 (17:50 +0100)]
gsk: Drop modelview/projection from GskRenderer API
The details of the modelview and projection matrices are only useful for
the GL renderer; there's really no point in having those details
available in the generic API — especially as the Cairo fallback renderer
cannot really set up a complex modelview or a projection matrix.
Emmanuele Bassi [Tue, 9 Aug 2016 16:10:15 +0000 (17:10 +0100)]
gtk: Sort children by window depth when rendering
This makes popovers pop over instead of under.
Emmanuele Bassi [Tue, 9 Aug 2016 15:30:13 +0000 (16:30 +0100)]
gsk: Ensure that non-drawing nodes are supported
Non-drawing nodes should skip the texturing phase.
Emmanuele Bassi [Tue, 9 Aug 2016 15:28:43 +0000 (16:28 +0100)]
gtk: Add a box render node for gadgets
Instead of using the background as the gadget's node, we add a
non-drawing node that can be used to apply offsets; all other nodes are
children of the "box" node.
Emmanuele Bassi [Tue, 9 Aug 2016 15:27:18 +0000 (16:27 +0100)]
gsk: Fix the blend mode
The default blend mode should be the equivalent of Cairo's OVER
operator.
Emmanuele Bassi [Tue, 9 Aug 2016 10:24:05 +0000 (11:24 +0100)]
gsk: Reuse VAOs with identical buffers
Just like we reuse texture ids with the same size we can, at the expense
of a little memory, reuse vertex buffers if they reference the same
attributes and contain the same data.
Each VAO is marked as free at the end of the frame, and if it's not
reused in the following frame, it gets dropped.
Emmanuele Bassi [Mon, 8 Aug 2016 18:34:03 +0000 (19:34 +0100)]
gsk: Remove child-transform from render nodes
The child-transform is useful only if we also provide clipping to the
parent nodes, otherwise children will just be drawn outside of the
parent's bounds.
We'll introduce child transforms either at a higher layer, or once we
add clipping support to GskRenderNode.
Matthias Clasen [Sun, 7 Aug 2016 04:36:24 +0000 (00:36 -0400)]
Covert GtkOverlay to indirect rendering
There is no gadget, so we use the gtk_widget_create_render_node
function for the first time here.
Matthias Clasen [Sun, 7 Aug 2016 04:03:17 +0000 (00:03 -0400)]
Convert GtkComboBox to indirect rendering
The removal of the draw method in GtkComboBox reveals another
instance of parent-child invariant violation in GtkComboBoxText.
Matthias Clasen [Sun, 7 Aug 2016 03:45:43 +0000 (23:45 -0400)]
GtkButtonBox: Convert to indirect rendering
Matthias Clasen [Sun, 7 Aug 2016 03:19:40 +0000 (23:19 -0400)]
Small documentation additions
Matthias Clasen [Sun, 7 Aug 2016 03:08:04 +0000 (23:08 -0400)]
Small fixes for the docs
Set titles and short descriptions for the sections.
Matthias Clasen [Sun, 7 Aug 2016 03:07:29 +0000 (23:07 -0400)]
gsk: Build docs
Matthias Clasen [Sun, 7 Aug 2016 00:27:30 +0000 (20:27 -0400)]
GtkListBox: Convert to indirect rendering
Note that there is a problem with the pixel cache that causes
listboxes to come out black when in a scrolled window.
Matthias Clasen [Sun, 7 Aug 2016 00:02:49 +0000 (20:02 -0400)]
gadget: Fix handling of custom content
The transformations here were wrong, causing content to go nowhere.
This patch fixes check and radio buttons to appear as expected.
Matthias Clasen [Sat, 6 Aug 2016 23:35:03 +0000 (19:35 -0400)]
GtkCheckButton: Convert to indirect rendering
This is another example of indirect rendering with a box gadget.
There is currently still some positioning problem with the
checkmark.
Matthias Clasen [Sat, 6 Aug 2016 23:33:47 +0000 (19:33 -0400)]
Prevent box gadget content from being drawn twice
Now that we split out box gadget children into separate
render nodes, we must not draw them onto the box gadgets
node anymore.
Matthias Clasen [Sat, 6 Aug 2016 23:05:14 +0000 (19:05 -0400)]
GtkExpander: Convert to indirect rendering
This is the first example of indirect rendering involving
a box gadget. For now, we iterate the child gadgets manually,
and rely on gtk_container_propagate_render_node for the
child widgets. Eventually, we may want a better solution
here.
Matthias Clasen [Sat, 6 Aug 2016 21:23:24 +0000 (17:23 -0400)]
gadget: Add a has_content vfunc
...and implement it for GtkCssGadget and GtkCssCustomGadget.
This allows us to decide on a per-object basis if a custom
gadget needs a render node for content or not.
Matthias Clasen [Sat, 6 Aug 2016 14:34:18 +0000 (10:34 -0400)]
button: Restore focus
The custom gadget draw function has the side effect of informing
the gadget machinery wether to draw focus or not. Bring the
draw function back, just for its boolean return value. We may
want to find a better solution for this.
Matthias Clasen [Sat, 6 Aug 2016 14:24:05 +0000 (10:24 -0400)]
Allow selective debug spew
I don't think this should stay in the code long-term, but it
is useful for debugging. It helped me track down some suspicious
placements of render nodes.
Matthias Clasen [Sat, 6 Aug 2016 14:23:20 +0000 (10:23 -0400)]
Add details to css render nodes
Give all nodes the same detail about the owner widget.
This reveals that every GtkCssCustomGadget gets a
DrawGadgetContents node, even if their draw_func is NULL.
We may want to come up with a better solution for that.
Matthias Clasen [Sat, 6 Aug 2016 13:37:47 +0000 (09:37 -0400)]
Some debug help
Make the bounds of drawing surfaces created by render nodes visible.
Trigger with GSK_DEBUG=surface.
Matthias Clasen [Fri, 5 Aug 2016 12:13:53 +0000 (08:13 -0400)]
Drop an unused variable
Emmanuele Bassi [Thu, 4 Aug 2016 18:19:46 +0000 (19:19 +0100)]
gtk: Clean up render fallback node creation in GtkWidget
Emmanuele Bassi [Thu, 4 Aug 2016 18:19:14 +0000 (19:19 +0100)]
gtk: Port GtkHeaderBar to render nodes
Emmanuele Bassi [Thu, 4 Aug 2016 18:18:58 +0000 (19:18 +0100)]
gtk: Port GtkActionBar to render nodes
Emmanuele Bassi [Thu, 4 Aug 2016 18:16:43 +0000 (19:16 +0100)]
gtk: Attempt at handling CSS coordinates
When creating the GskRenderNodes for the gadgets we should not translate
the coordinates inside the Cairo context, but we should tweak the
coordinates of the anchor point.
This is still not enough to get an appropriate rendering, as the result
is still slightly offset to the left.
Emmanuele Bassi [Thu, 4 Aug 2016 18:14:51 +0000 (19:14 +0100)]
gsk: Pass the appropriate value for the n_quads argument
Instead of passing the size of the buffer, we should pass the number of
quads; we know what the size of a single quad structure is, so we can do
the multiplication internally when creating the VAO.
This allows us to print the quads for debugging purposes.
Matthias Clasen [Wed, 3 Aug 2016 01:26:03 +0000 (21:26 -0400)]
GtkFrame: Convert to indirect rendering
Create a GskRenderNode for the contents of the frame.